﻿// See https://aka.ms/new-console-template for more information
//int a, b, c;
//数组，集合
//int[] array =new int[]{1,2,3,4,5,6 };
//string[] strs = new string[] {"a","b","c" };
//char[] chars = new char[] { 'a', 'b', 'c' };
//string str = "abc";

// "10+10"
// "10","+","10"





////100+10
//string f = "100-10";
//char[] ops=new char[] {'+','-','*','/' };
//string[] arr1 = f.Split(ops);
//string n1=arr1[0];
//string n2=arr1[1];
//int length = n1.Length;
//int op_index = length;
//string op = f[op_index].ToString();

////string op = f[arr1[0].Length].ToString();


//int a = 1;
////string n1 = "";
////string n2 = "";
////string op = "";
////bool before=true;
////for(int i = 0; i < f.Length; i++)
////{

////    if(f[i] == '+')
////    {
////        before = false;
////        op = f[i].ToString();
////        continue;
////    }

////    if(before)
////    {
////        n1 += f[i];
////    }
////    else
////    {
////        n2+= f[i];
////    }
////}



////string[] arr= new string[] { "10", "+", "10" };
//////索引 序号
////string num1_Str= arr[0];
////string num2_Str = arr[2];
////string op_str=arr[1];
////
//int num1 =int.Parse( n1);


//访问修饰符 public private protected internal
//返回值类型 void ,int string bool
//方法名 Sum  开头字母大写
//括号  括号里面是参数
//花括号  方法体
//返回值
//调用方法 
int n1 = 2;
int n2 = 3;
int n=Sum(n1,n2);
Console.WriteLine(n);

static int Sum(int a,int b)
{
    int c = a + b;
    //很多复杂的事
    return c;
}